using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Build.Framework;

namespace WMVConvert
{
	internal static class TaskItemHelper
	{
		public static T Get<T>(ITaskItem item,string key)
			where T:struct
		{
			string value = item.GetMetadata(key);
			if (typeof(T)==typeof(int))
			{
				return (T) ((object)int.Parse(value));
			}
			return default(T);
		}
	}
}
